package com.lyj.mode.principle.demeter;

import java.util.ArrayList;
import java.util.List;

/**
 * 部门员工管理员
 * @author:liyajie
 * @createTime:2022/2/8 11:52
 * @version:1.0
 */
public class DepartmentManager {

    /**
     * 获取部门员工信息
     * @author: liyajie
     * @date: 2022/2/8 12:29
     * @param
     * @return java.util.List<com.lyj.mode.principle.demeter.DempartEmployee>
     * @exception:
     * @update:
     * @updatePerson:
     **/
    public List<DempartEmployee> getDempartEmployee(){
        List<DempartEmployee> list = new ArrayList<DempartEmployee>();
        for (int i = 0; i < 5; i++) {
            DempartEmployee dempartEmployee = new DempartEmployee();
            dempartEmployee.setId("部门员工，id是" + i);
            list.add(dempartEmployee);
        }
        return list;
    }

    public void pringAllEmployee(CompanyManager companyManager){
        List<DempartEmployee> dempartEmployeeList = getDempartEmployee();
        for (DempartEmployee dempartEmployee : dempartEmployeeList) {
            System.out.println(dempartEmployee.getId());
        }
        System.out.println("--------------------------------");
        List<CompanyEmployee> companyEmployeeList = companyManager.getCompanyEmployee();
        for (CompanyEmployee companyEmployee : companyEmployeeList) {
            System.out.println(companyEmployee.getId());
        }
    }

}
